<template>
  <div class="breadcrumb">
    <a-breadcrumb separator=">">
      <template v-for="(item, index) in data">
        <a-breadcrumb-item v-if="item.meta.title" :key="index">{{
          item.meta.title
        }}</a-breadcrumb-item>
      </template>
    </a-breadcrumb>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: []
    };
  },
  watch: {
    $route() {
      this.data = this.$route.matched;
    }
  },
  created() {
    this.data = this.$route.matched;
  }
};
</script>
